def is_prime(n):
    import math
    n = abs(n)
    i = 2
    while i <= math.sqrt(n):
        if n % i == 0:
            return False
        i += 1
    return True
def primes(n):
    if(n <= 2): return []
    elif n==3: return [2]
    else:
        rs = [2]
        for x in range(3,n,2):
            if(is_prime(x) == True):
                rs = rs+[x]
        return rs
def printPrimePower(n):
    rs = primes(n)
    for i in primes(n):
        lt = 2
        while (i**lt) < n:
            rs+=[i**lt]
            lt+=1
    for j in reversed(sorted(rs)):
        print j,
